var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(mode, type, selection) {
    var reactor = "action" + cm.getMapId();
    eval(reactor)(mode, type, selection)
}

function action800020001(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.sendNormalTalk("#b(森林完全毁掉了。这里似乎发生过相当激烈的战斗。)#k", 2, 9112005, false, true);
            if (cm.getNumberFromQuestInfo(58723, "pt1") > 0) {
                cm.dispose()
            } else {
                cm.updateInfoQuest(58723, "pt1=1")
            }
        } else {
            if (status === a++) {
                cm.playerMessage(-1, "<请通过传送口移动到下个地图。");
                cm.dispose()
            }
        }
    }
}

function action800020002(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            cm.sendNormalTalk("#b(是狸猫妖怪。它看起来已经精疲力竭了。\r\n狸猫妖怪们是跟谁起冲突了呢……？)#k", 2, 9112005, false, true);
            if (cm.getNumberFromQuestInfo(58723, "pt2") > 0) {
                cm.dispose()
            } else {
                cm.updateInfoQuest(58723, "pt1=1;pt2=1")
            }
        } else {
            if (status === a++) {
                cm.playerMessage(-1, "<请通过传送口移动到下个地图。");
                cm.dispose()
            }
        }
    }
};